package com.neusoft.demo2;

import java.util.Scanner;

public class ConDemo3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入是否是会员(y/n)");
        String identity = sc.next();
        System.out.println("请输入消费的金额");
        double money = sc.nextDouble();
        if("y".equals(identity)) {
            if(money > 200) {
                money = money * 0.75;
            }else {
                money = money * 0.8;
            }
        }else { //非会员
            money = money * 0.9;
        }
        System.out.println("实际支付："+money);
    }
}
